The invention relates to a programmable controller for controlling input/output devices in a desired order, and more particularly, to a return processing device for use upon restoration of power source after service interruption.
Generally, programmable controllers basically comprise a user program memory for storing a user program, an input circuit to which external input signal is applied, an output circuit for delivering an external output signal, an input/output memory for storing external input/output data corresponding to said input circuit and said output circuit and internal input/output data for internal operations, and a control section for executing instructions provided by the user program memory to perform predetermined control operations. The basic control operations performed by the control section include operational processing performed on the basis of data in the input/output memory, rewriting output data in the input/output memory in accordance with results from the operational processing step writing input data of the input circuit into a predetermined area of the input/output memory, setting and output data in the predetermined area of the input/output memory to the output circuit.
In factories where programmable controller of this kind are installed, service interruption occurs, and temporary lowering of power source voltage (simultaneous service interruption) resulting from operation of many electric devices often occurs. Then, it is necessary for the programmable controller to ensure safe operation of the electric devices even if such service interruption should occur. That is, the problem is the return processing upon restoration of power source after service interruption. This return processing mainly comprises the processing of a judgment of whether or not the content of the output circuit is returned to the state prior to occurrence of power-off or whether or not the circuit is initialized to restart the operation from the beginning. This judgement is made in accordance with the input/output state existing at the occurrence of power-off, the input state existing at restoration of power source, etc.
However, a conventional programmable controller has been designed so that only the area for storing the internal input/output data out of the input/output memories is provided to maintain the stored data at the time of power-off. Here, the external input/output data is not maintained at the time of power-off in order to prevent unexpected status from being brought forth due to the delivery of the content of the input/output memory to the external devices from the output circuit at the restoration of power source.
Therefore, the power-off processing program prepared by the user was necessary to include processing for transferring the external input/output data, which are present until the power-off occurs, from the predetermined area of the input/output memory to a memory such as a keep relay having a memory maintaining function, and also to include processing for retransferring the external input/output data maintained by the aforementioned memory, such as a keep relay, upon restoration of power from the power source to the input/output memory. A power-off processing program including such processings as described above is extremely difficult to understand, is complicated and is not favorably accepted.